home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / scrtes / readme < prev    next >
Text File  |  1993-07-25  |  4KB  |  102 lines

  1.  
  2. COMMENTS ON SCRTEST - GENERAL PURPOSE DEMO OF BROWSER/SCROLLER     26/July/93
  3. ==============================================================     ==========
  4.  
  5. Hi All,
  6.  
  7. First the excuses :
  8. -------------------
  9. I'm new to V.B. so this is probably NOT the best way to do it, I really
  10. would like suggestions on any improvements. I've just ported the code
  11. from the way I do it in Clipper, I've had to use cheats to implement
  12. the extra bits required to support Scroll-Thumb directed movements.
  13.  
  14. Listbox / Scroll-bar synchronization
  15. ------------------------------------
  16. Keeping the Listbox and the Scroll-bar in synch drove me *NUTS* because
  17. altering the Listbox-index from the scroll-change event triggered a
  18. Listbox-click event and altering the Scroll-value from the Listbox-click
  19. event triggered a scroll-change event. This resulted in some pretty amazing
  20. recursion loops. I got round the problem by keeping a 'recursion-depth'
  21. counter and ingnoring events below the surface level. There must be a better
  22. way !
  23.  
  24. Key Searches
  25. ------------
  26. The keypress seeks are really nice when you're in a big file and want to get
  27. to a specific entry fast. You might want to add some extra feedback in a label
  28. or text box so the User can see how the Composite key is building up and know
  29. when the search fails. I keep a truncated data key in the file that has the
  30. characters converted to upper-case.
  31.  
  32. Thumb directed reads
  33. --------------------
  34. I've implemented this because people seem to expect it in windows apps, I'm
  35. not at all convinced that it serves any real purpose because the fastest way
  36. to get what you want has to be a keyed search. What I do is have a record-number
  37. stored in the file that reflects its relative position in the file. This can
  38. only be maintained as a 'batch' process so it's not so good for constantly
  39. changing files.
  40.  
  41. Obvious improvements
  42. --------------------
  43. It's not too efficient only loading 10 records at a time, some sort of buffer
  44. coding could enable more to be loaded at a time but the code would be more
  45. complicated.
  46.  
  47. Questions
  48. ---------
  49. Can I index a field on its contents converted to upper case ?
  50.  
  51. Can I jump directly to a relative position in an indexed file - eg. the 1,275th
  52. record (measured from the start and INDEXED) of a 5,000 record file ?
  53.  
  54. Can I jump directly to the first or last record of an indexed file without
  55. cheating with a SEEK ( the equivalent of a GO TOP or GO BOTTOM in dBase) ?
  56.  
  57. Are there any limitations on the range of ascii characters allowed to be in
  58. a database field ?
  59.  
  60.  
  61. The application
  62. ---------------
  63. I have an application written in Clipper that has the UK pop charts for every
  64. week since 1960. Access is by Group, Title and Date. I'm currently trying to
  65. port it across to V.B. because :
  66.     1)  It's a good way to learn V.B.
  67.     2)  There is a market for the product ported to windows
  68.     3)  I prefer working from windows these days (it's so much NICER)
  69.  
  70.  
  71. Regards,
  72.  
  73.  Ross Whittaker
  74.  CIS:100275,317
  75.  ~~~~~~~~~~~~~~
  76.  
  77. p.s.
  78.      Can I have lots of feedback PLEASE, all criticism gratefully received
  79.  
  80.  
  81. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  82.  
  83. SCRTEST.ZIP - File contents
  84. ---------------------------
  85. README       - This file
  86. SCRTEST.MAK  - The project file
  87. SCRTEST.FRM  - The form file
  88. AFILE.MDB    - The data file (a subset of 60's pop groups if you must know)
  89. AFILE.LDB    - The data control file (?)
  90.  
  91. The test file data structure
  92. ----------------------------
  93. Database  =  AFILE
  94. Table     =  ATABLE
  95. Fields    =  AFIELD    X(30)   (main data field)
  96.              ARECNO    X(5)    (relative position)
  97.              AKEY      X(10)   (upper(mid(afield,1,10)))
  98. Indexes   =  AINDEX1 = ARECNO  UNIQUE   PRIMARY
  99.              AINDEX2 = AKEY    DUPS-OK  NOT-PRIMARY
  100.  
  101. ==================== end of file =========================
  102.